/*
 * Copyright (c) 2018-2999 九五云信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.bean.model.OrderItem;
import com.yami.shop.bean.param.PayTopParam;
import com.yami.shop.bean.param.ProdAnalysisSurveyParam;
import com.yami.shop.bean.param.ProdEffectParam;
import com.yami.shop.bean.param.ProdEffectRespParam;
import com.yami.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface OrderItemMapper extends BaseMapper<OrderItem> {

    List<OrderItem> listByOrderNumber(@Param("orderNumber") String orderNumber, @Param("lang") Integer lang);

    void updateByDeliveries(@Param("orderItems") List<OrderItem> orderItems);

    List<OrderItem> getListByOrderNumber(@Param("orderNumber") String orderNumber);

    IPage<PayTopParam> getPayAmounts(PageParam<OrderItem> page, @Param("param") ProdAnalysisSurveyParam param, @Param("dbLang") Integer dbLang);

    PayTopParam getPayAmount(@Param("prodId") Long prodId, @Param("shopId") Long shopId);

    Integer countPayPerson(@Param("prodId") Long prodId, @Param("param") ProdEffectParam param);

    Integer getPayPersonNumByParam(@Param("prodId") Integer prodId, @Param("shopId") Long shopId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    void insertBatchOrderItemLang(@Param("orderItems") List<OrderItem> orderItems);

    List<ProdEffectRespParam> getProdEffectByDateAndProdIds(@Param("prodIds") List<Long> prodIds, @Param("startTime") Date startTime, @Param("endTime") Date endTime);


//    List<OrderItem> getUnCloseRefundOrderItemByOrderNumber(String orderNumber);

//	void insertBatch(List<OrderItem> orderItems);

//	List<OrderItem> getPayByOrderNumber(@Param("orderNumber") String orderNumber);

}
